package com.itheima.mapper;

import com.itheima.domain.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface StudentMapper {
        @Select("SELECT * FROM student")
        List<Student> findAll();
        @Select("SELECT * FROM student WHERE id=#{id}")
        Student selectById(Integer id);
        @Insert("INSERT INTO student VALUES (#{id},#{name},#{age})")
       Integer selectInto(Student stu);
        @Update("UPDATE  student SET name=#{name},age=#{age} WHERE id=#{id}")
        Integer update(Student stu);
        @Delete("delete from student where id=#{id}")
        Integer delete(Integer id);

}
